
const express = require('express')
const router = express.Router()

const { getRoleList, getPermissionList, addRole,
    delRole, editRole, getPermListById,
    dispatchPerm, getExpPermListById, delPermById } = require('../router_handle/role')

//角色列表
router.get('/getRoleList', getRoleList)

//权限列表
router.get('/getPermissionList', getPermissionList)

//添加角色
router.post('/addRole', addRole)

//删除脚色
router.post('/delRole', delRole)

//删除脚色
router.post('/editRole', editRole)

//根据角色id获取对应权限列表
router.get('/getPermListById', getPermListById)

//分配（更改）权限
router.post('/dispatchPerm', dispatchPerm)

//分配（更改）权限
router.get('/getExpPermListById', getExpPermListById)

//删除role_id对应的权限ps_ids
router.post('/delPermById', delPermById)

module.exports = router